class UrlMappings {
    static mappings = {
        "/$controller/$action?/$id?" {
            constraints {
                id(matches:/[0-9]*/)
            }
        }

        /*"/$controller/list"(controller: "$controller") {
            action = [GET: "list"]
        }
        "/$controller/create"(controller: "$controller") {
            action = [GET: "create"]
        }
        "/$controller/edit"(controller: "$controller") {
            action = [GET: "edit"]
        }*/

        //Rest urls start
        /*"/team"(controller: "team", parseRequest: true) {
            action = [GET: "list", POST: "save"]
        }
        "/team/$id?"(controller: "team", parseRequest: true) {
            action = [GET: "show", PUT: "update", DELETE: "delete"]
            constraints {
                id(matches:/[0-9]*//*)
            }
        }*/


        "/$controller"(parseRequest: true) {
            action = [GET: "list", POST: "save"]
            constraints {

            }
        }
        "/$controller/$id?"(parseRequest: true) {
            action = [GET: "show", PUT: "update", DELETE: "delete"]
            constraints {
                id(matches:/[0-9]*/)
            }
        }

        /*"/soccerMatch"(controller: "soccerMatch", parseRequest: true) {
            action = [GET: "list", POST: "save"]
        }
        "/soccerMatch/$id?"(controller: "soccerMatch", parseRequest: true) {
            action = [GET: "show", PUT: "update", DELETE: "delete"]
        }*/
        //Rest urls end

        "/soccerMatch/upcoming"(controller: "soccerMatchCustom") {
            action = [GET: "upcoming"]
        }


        "/"(view: "/index")
//        "/"(controller:'common', action:'upcomingMatch')
        "/dynamicSitemap"(controller:'sitemapEntry', action:'generateSitemap')
        "500"(view: '/errorxml')
    }
}
